<?php
/**
 * Dependency cli interface
 *
 * PHP version 5
 *
 * @category  W
 * @package   Interfaces
 * @author    Olivier Hoareau <olivier@phppro.fr>
 * @copyright 2009 PHPPRO http://www.phppro.fr
 * @license   http://dev.phppro.fr/license PHPPRO
 * @version   SVN: $Id:$
 * @link      http://dev.phppro.fr/projects/wdependency
 */
/**
 * Dependency cli interface
 *
 * @category  W
 * @package   Services
 * @author    Olivier Hoareau <olivier@phppro.fr>
 * @copyright 2009 PHPPRO http://www.phppro.fr
 * @license   http://dev.phppro.fr/license PHPPRO
 * @version   SVN: $Id$
 * @link      http://dev.phppro.fr/projects/wdependency
 */
interface W_Dependency_Cli_Interface
{
    /**
     * Formats the options
     *
     * @return array
     */
    public function formatOptions($options);
    /**
     * Lists all plugin for specified options on command line.
     * Will return an array, for example:
     *
     * array(
     *     // list of plugins by type
     *     0 => array(
     *         array(
     *             'filter' => array(
     *                 0 => array(
     *                     array('exactLinks',array('value'=>12)),
     *                 ),
     *             'aggregator' => array(
     *             ),
     *         ),
     *     // cleaned options array
     *     1 => array(
     *         'unknownOption' => 'value',
     *     ),
     * )
     *
     * @param array $options the options
     *
     * @return array containing plugins list and cleaned options
     *
     * @throws Exception if an error occured
     */
    public function listPluginsForOptions($options);
    /**
     * Lists all plugins for specified option/value.
     * Will return an array, for example:
     *
     * array(
     *     0 => array('filter'    , 'moreThanLinks', array('value'=>12)),
     *     1 => array('aggregator', 'directory     , array()),
     *     2 => array('filter'    , 'exactLinks'   , array('value'=>12)),
     * )
     *
     * @param string $name    option name
     * @param mixed  $value   option value
     * @param array  $options the context
     *
     * @return array of plugins
     *
     * @throws Exception if an error occured
     */
    public function listPluginsForOption($name,$value,$options);
}